<template>
  <div class="tab">
    <router-link class="tab-item" tag="div" to="/recommend">
      <span class="tab-link">推荐</span>
    </router-link>
    <router-link class="tab-item" tag="div" to="/singer">
      <span class="tab-link">歌手</span>
    </router-link>
    <router-link class="tab-item" tag="div" to="/rank">
      <span class="tab-link">排行</span>
    </router-link>
    <router-link class="tab-item" tag="div" to="/search">
      <span class="tab-link">搜索</span>
    </router-link>
  </div>
</template>

<script type="text/ecmascript-6">
export default {}
</script>

<style lang="stylus" scoped rel="stylesheet/stylus">
  @import '~common/stylus/variable';

  .tab {
    display: flex;
    height: 44px;
    font-size: $font-size-medium;

    .tab-item {
      flex: 1;
      height: 100%;
      line-height: 44px;
      text-align: center;

      .tab-link {
        font-weight: bold;
        color: $color-text-l;
        padding-bottom: 4px;
      }
    }

    .router-link-active {
      .tab-link {
        border-bottom: 2px solid $color-theme;
        color: $color-theme;
      }
    }
  }
</style>
